<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改辈分')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-seniority-edit" th:object="${fSeniority}">
            <input name="sId" th:field="*{sId}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label"> 所属家族：</label>
                <div class="col-sm-8">
                    <select class="form-control" name="surnameId">
                        <option th:each="dict : ${fcanList}" th:text="${dict.name}" th:value="${dict.cId}" th:selected="${fSeniority.surnameId == dict.cId ? true : false}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">辈序号：</label>
                <div class="col-sm-8">
                    <input name="numSort" th:field="*{numSort}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">辈名称：</label>
                <div class="col-sm-8">
                    <input name="numTag" th:field="*{numTag}" class="form-control" type="text" style="width: 60%;float: left;" required>
                    <label class="col-sm-3 control-label" style="width: 40%;float: left;text-align: left;">(辈名称要与辈序号对应)</label>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">行辈字：</label>
                <div class="col-sm-8">
                    <input name="cnTag" th:field="*{cnTag}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="remark" th:field="*{remark}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "family/seniority";
        $("#form-seniority-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-seniority-edit').serialize());
            }
        }
    </script>
</body>
</html>